Skip to content

Conversation

@conbrad
Copy link
Collaborator

@conbrad conbrad commented Nov 24, 2025

This PR migrates the backend Python project from Poetry to UV and restructures the codebase into a monorepo with separate packages. Uses a single virtual env, backend/.venv/. Setup to install and run has been updated and instructions found in backend/packages/wps-api/README.md.

Package Management

  • Migrated from Poetry to UV for faster dependency resolution and installation
  • Created workspace configuration with 4 Python packages: wps-api, wps-shared, wps-jobs, wps-tools
  • In a follow up PR I'll move the sfms package (code for SFMS windows box).

Code Restructure

CI/CD Updates

  • Updated all GitHub Actions workflows to use UV instead of Poetry
  • Added test-wps-jobs job to integration and post-merge workflows
  • Updated all Docker builds to use UV
  • Updated OpenShift deployment templates

Changes

  • Adjusted test tolerances (this seems to flip/flop a lot so I increase the tolerance):
    • uv vs poetry dependency resolution leading to slightly different package versions
  • Adjusted README documentation to account for setup, including brew install uv for mac.sh.
  • Local Dockerfile for local dev uses simpler app startup command

Testing

  • All existing tests pass with the new structure
  • Coverage reporting now works for all packages separately
  • CI pipeline validates all packages independently
  • Manually kicked off ecmwf job with oc create job -n e1e498-dev "ecmwf-1" --from=cronjob/ecmwf-wps-pr-4912 to verify herbie works, let other jobs run overnight.
  • Manually kicked off SFMS nats consumer processing with tif_pusher script (in new package with uv run --package wps-tools python -m wps_tools.tif_pusher 2025-06-24 2025-06-25) to verify SFMS tifs are processed

Closes #4903

Test Links:

Landing Page
MoreCast
Percentile Calculator
C-Haines
FireCalc
FireCalc bookmark
Auto Spatial Advisory (ASA)
HFI Calculator
SFMS Insights
Fire Watch

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.61%. Comparing base (3843e35) to head (0f74acb).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4912      +/-   ##
==========================================
+ Coverage   70.94%   74.61%   +3.67%     
==========================================
  Files         372      583     +211     
  Lines       15621    27544   +11923     
  Branches     1846     2115     +269     
==========================================
+ Hits        11082    20552    +9470     
- Misses       3933     6360    +2427     
- Partials      606      632      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@conbrad conbrad requested review from brettedw and dgboss November 25, 2025 22:34
@conbrad conbrad requested a review from dgboss November 27, 2025 18:25
Copy link
Collaborator

@dgboss dgboss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this on. It looks great!

@conbrad conbrad requested a review from brettedw December 1, 2025 16:56
Copy link
Collaborator

@brettedw brettedw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling that, looks great!

@conbrad conbrad force-pushed the task/migrate-to-uv branch from db2435d to 872f98d Compare December 1, 2025 19:12
@conbrad conbrad requested a deployment to production December 1, 2025 19:27 Abandoned
@conbrad conbrad temporarily deployed to production December 1, 2025 20:06 Inactive
@conbrad conbrad temporarily deployed to production December 1, 2025 20:51 Inactive
@conbrad conbrad temporarily deployed to production December 1, 2025 21:09 Inactive
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 1, 2025

@conbrad conbrad temporarily deployed to production December 1, 2025 21:26 Inactive
@conbrad conbrad merged commit f9bc718 into main Dec 1, 2025
33 checks passed
@conbrad conbrad deleted the task/migrate-to-uv branch December 1, 2025 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dev: Migrate from poetry to uv

4 participants